
#ifndef PROCESSHTML_H
#define PROCESSHTML_H

#include <string>
#include <fstream>
#include <iostream>
#include <direct.h>
#include <stdlib.h>
#include "../Header/GetPhotoByWebAddr.h"

using std::ofstream;
using std::ifstream;
using std::string;

class ProcessHtml
{
public:
	ProcessHtml();
	~ProcessHtml();
	void getPhotoname();
	void processPhoto(string &);
	int movePhoto(string & img_name);
	int copyPhoto(string & img_name);
	void processHtmlFile(string &);
	int initProcess();
	void writeNewHtml(string &);
	void freeRes();
	bool GetPhotoByWeb(const string &);
	bool CreaterNewPhotoFile();
	void ReadProcessedLine();
	void LineIfProcessed();

public:
	ofstream log_file, err_file, web_addr_file, new_html_file;
	ifstream html_file;

private:
	GetPhotoByWebAddr get_photo_by_web;
	string html_name;
	unsigned int line_number;
	unsigned int record_line_number;
	string str_dir_name;
	string img_name;
	string str_rename;
	string str_log_file_name;
	string str_miss_file_name;
	string str_web_addr_file_name;
	string str_new_html_file;
	int rename_id;
	unsigned int photo_total_num;
	bool no_processed;
	//string rename_id;
	//string str_move_order;
	//string str_copy_order;
};

#endif